﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using System.Data.SqlClient;
using Common;

namespace DAL
{
    public class ODSStgOnConditionDAL : DB
    {
        public ODSStgOnConditionDAL(LoginInfo info)
        {
            base.loginInfo = info;
        } 
        public bool Add(ODSStgOnCondition data, HIDB.dbo con)
        {
            bool result = true;
            try
            {
                //添加输入输出参数
                SqlParameter[] sqlparams = new SqlParameter[]
                { 
                     new SqlParameter("@GUID",data.GUID)
                    ,new SqlParameter("@Column_ID_Left",data.Column_ID_Left)
                    ,new SqlParameter("@Column_ID_Right",data.Column_ID_Right)
                    ,new SqlParameter("@ODS_Id",data.ODS_Id)
               };
                con.StoredUpdate("[Working_db].[UP_ODS_Stg_On_Condition_Insert]", sqlparams);
            }
            catch (Exception ex)
            {
                result = false;
                Logger.LogError("[Working_db].[UP_ODS_Stg_On_Condition_Insert]", "[Working_db].[UP_ODS_Stg_On_Condition_Insert]", 0, 1, ex, "", "");
            }
            return result;
        }
    }
}
